Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supersedes #767
This approach follows a similar approach to Biome, where we still rely on downloading bundled versions, but with a better interface.
By default, we look for a StyLua binary on the PATH (Closes #527). This can be disabled with
stylua.searchBinaryOnPATH
.The stylua binary lookup works in the following order:
stylua.styluaPath
if specifiedstylua.useBinaryFromPATH
is enabled (default: true)StyLua is commonly managed by other tools such as Aftman/Foreman, or a system installation. Step (2) means that we will use the same version that a user has on the command line to run stylua. This means the version will always remain in sync
If there is no StyLua binary available, we use a bundled extension like before, with a few updates:
stylua.targetReleaseVersion
:Also, if the stylua binary found on the PATH fails to execute (e.g., aftman managed but not in aftman.toml), we gracefully fall back to the bundled version